<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>简介</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="book.xdiff.html">« xdiff</a></li>
      <li style="float: right;"><a href="xdiff.setup.html">安装/配置 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.xdiff.html">xdiff</a></li>
    <li>简介</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="intro.xdiff" class="preface">
  <h1 class="title">简介</h1>
  <p class="para">
   xdiff extension enables you to create and apply patch files containing
   differences between different revisions of files.
  </p>
  <p class="para">
   This extension supports two modes of operation - on strings and on files, as well
   as two different patch formats - unified and binary. Unified patches are excellent
   for text files as they are human-readable and easy to review. For binary files like
   archives or images, binary patches will be adequate choice as they are binary safe and
   handle non-printable characters well.
  </p>
  <p class="para">
   Starting from version 1.5.0 there are two different sets of functions for generating
   binary patches. New functions - <span class="function"><a href="function.xdiff-string-rabdiff.html" class="function">xdiff_string_rabdiff()</a></span> and 
   <span class="function"><a href="function.xdiff-file-rabdiff.html" class="function">xdiff_file_rabdiff()</a></span> generate output compatible with older functions
   but are typically faster and generate smaller results. For more details about methods of
   generating binary patches and differences between them, please check 
   <a href="http://www.xmailserver.org/xdiff-lib.html" class="link external">&raquo;&nbsp;libxdiff</a> website.
  </p>
  <p class="para">
   This extension uses libxdiff to implement these functions. Please see
   <a href="http://www.xmailserver.org/xdiff-lib.html" class="link external">&raquo;&nbsp;http://www.xmailserver.org/xdiff-lib.html</a> for more information.
  </p>
 </div></div></div></body></html>